Found a weird quirk. When you pass in the method directly (line 9/10) it's a lot more stable.
.onAppear {
viewModel.onAppear()
}
.onDisappear {
viewModel.onDisappear()
}
.onAppear(perform: viewModel.onAppear)
.onDisappear(perform: viewModel.onDisappear)